package com.cyx.mapper;

import com.cyx.pojo.Author;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AuthorMapper {

    int addAuthor(@Param("author") Author author);
    Author getAuthorById(@Param("id") int id);

    Author getAuthorById2(@Param("id") int id);

    List<Author> getAuthorList(@Param("name") String name, @Param("address") String address);

    //获取指定条件的作者,如果参数为空，返回全部是女性的作者
    List<Author> getAuthorList2(@Param("name") String name,@Param("address") String address);
}
